1. Field of the Invention
The present invention relates generally to the tracking of program operations on a computer system, and more particularly to a method of incorporating an undo operation into application programs with minimal changes to the application programs.
2. Description of the Related Art
Many of today's computer program incorporate “undo” functionality whereby the most recently committed modification to a program object may be undone, and the program object restored its state immediately prior to the modification. Some applications support multi-level undo, whereby multiple modifications starting from the most recent to the earliest may be undone in sequence.
U.S. Pat. No. 5,481,710 to Keane et al., explains that due to the many different types of programs and different data types each program supports, it is very difficult to provide one undo algorithm, or method, that can be easily incorporated into different types of programs. Therefore, the undo function is typically tightly integrated, and customize, to each program. To address this issue, Keane et al. describe an undo/redo service that is established in the computer system where a program that will use their undo/redo service is installed. Application programs that want to make use of the undo/redo service must register themselves with the undo/redo service. The service will then maintain a log of modifications, however, the service itself does not monitor for modifications or even determine what changes have been done. Keane et al. still require that each program determine for itself what operations should be logged with the service. Furthermore, each program must build a service packet that contains the identity of the modified object and an instruction set that, when applied to the object, would cause the action to be undone, and instructions that, when applied to the object or objects, would cause the action to be redone. Thus in Keane et al., each program still has to be modified to have a customized undo/redo sub-program to generate a custom undo/redo sequence. In fact, Keane et al.'s service seems to just provide a logging and storing service for undo/redo service packets.
What's more, Keane et al.'s service can only undo the most recent operation, and does not appear flexible enough to provide targeted undo functions to object out of sequence order.
What is needed is a method, process, or service that can be made to provide an undo operation to existing programs with minimal modification to existing programs. That is, each existing program should have to be modified to itself generate an undo instruction sequence, or packet, that is to be stored in stack, and later popped for execution, as is the case in Keane et al.